<template>
 <div class="app-container" style="background-color:#FAFAFB">
<el-backtop :right="130"></el-backtop>
   
    <el-row type="flex" class="row-bg" justify="center" style="">
      <el-col :span="24"><div class="grid-content bg-purple-light">
         <el-card class="box-card" shadow="never" style="margin:0px;border:0px;">
          <el-steps :active="currentStep" finish-status="finish">
          <el-step title="借款人信息"></el-step>
          <el-step title="共款人信息"></el-step>
          <el-step title="申请情况信息栏"></el-step>
          <el-step title="抵押物信息栏"></el-step>
          <el-step title="附件信息栏"></el-step>
        </el-steps>

    </el-card>
        </div></el-col>
    </el-row>
    <el-row type="flex" class="row-bg" justify="center">
      <el-col :span="24">
        <div class="grid-content bg-purple-light">
        
        

          <!-- <Table v-on:stepChanged="stepChange($event)" v-if="currentStep === 1"/> -->
          <Borrower v-on:stepChanged="stepChange($event)" :operation="operation" :submitProjectId="submitProjectId" :taskId="taskId" v-if="currentStep === 1"/>
          <CoPayer v-on:stepChanged="stepChange($event)" :operation="operation" v-if="currentStep === 2"/>
          <ProjectInfo v-on:stepChanged="stepChange($event)" :operation="operation" v-if="currentStep === 3"/>
          <House v-on:stepChanged="stepChange($event)" :operation="operation" v-if="currentStep === 4"/>
          <File v-on:stepChanged="stepChange($event)" v-if="currentStep === 5"/>
          <Detail v-on:stepChanged="stepChange($event)" :operation="operation" :taskId="taskId" v-if="currentStep === 6"/>
    

        </div>
        </el-col>

    </el-row>

  </div>
</template>


<script>
// import Table from '@/views/project/table';
import Borrower from '@/views/project/borrower';
import CoPayer from '@/views/project/coPayer';
import ProjectInfo from '@/views/project/projectInfo';
import House from '@/views/project/house';
import File from '@/views/project/file';
import Detail from '@/views/project/detail';

export default {
  name: 'add',
  components: {
     Borrower,
     CoPayer,
    ProjectInfo,
    House,
    File,
    Detail
     },
  data() {
    return {
      currentStep: 1,
      name: "11",
      submitProjectId: undefined,
      taskId: undefined,
      operation: undefined,
    }
  },
  computed: {
  },
  created() {
      this.submitProjectId = this.$route.query.submitProjectId
      this.taskId = this.$route.query.taskId
      this.operation = this.$route.query.operation
  },
  methods: {
    stepChange(currentStep){
        this.currentStep = currentStep;
    }
  }
}
</script>
